﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;

namespace ASG.CodeGenerator.SQL
{
    public class DBMServerCodeCollection<ServerType, DatabaseType, ConnectionType, TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType> : List<ServerType>
        where ServerType : DBMServerCode<DatabaseType, ConnectionType, TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>, new()
        where DatabaseType : DatabaseCode<TableType, ColumnType, ProcedureType, ProcedureParameterType, ParameterType>, new()
        where ConnectionType : DbConnection
        where TableType : TableCode<ColumnType, ParameterType>
        where ColumnType : ColumnCode<ParameterType>
        where ProcedureType : ProcedureCode<ProcedureParameterType, ParameterType>
        where ProcedureParameterType : ParameterCode<ParameterType>
        where ParameterType : DbParameter
    {
        public DBMServerCodeCollection(string[] namesArray)
        {
            foreach (string name in namesArray)
            {
                ServerType server = new ServerType();
                server.Name = name;
                this.Add(server);
            }
        }
    }
}
